<include file="Public:header" />

<script type="text/javascript">
	function status(id,type){
	    $.get("{:U('ItemsTags/status')}", { id: id, type: type }, function(data){
			$("#"+type+"_"+id+" img").attr('src', '__PUBLIC__/statics/images/status_'+data.data+'.gif')
		},"json"); 
	}
</script>

</head>
<div class="pad-10" >
    <form name="searchform" action="{:U('ItemsTags/index')}" method="get" >
    <input name="a" type="hidden" value="index">
    <input name="m" type="hidden" value="ItemsTags">
    <input name="g" type="hidden" value="Admin">
    <table width="100%" cellspacing="0" class="search-form">
        <tbody>
            <tr>
            <td>
            <div class="explain-col">
				关键字 :
                <input name="keyword" type="text" class="input-text" size="25" value="{$keyword}" />
                  <select name="cate">
            		<option value="0">--选择分类--</option>
                	<volist name="cates" id="val">
                		<option value="{$val['id']}" <if condition="$val['id'] eq $cate">selected="selected"</if>>{$val['name']}</option>
                	</volist>
                  </select>
                <input type="submit" name="search" class="button" value="搜索" />
        	</div>
            </td>
            </tr>
        </tbody>
    </table>
    </form>
    
    <form id="myform" name="myform" action="{:U('ItemsTags/delete')}" method="post">
    <div class="table-list">
    <table width="100%" cellspacing="0">
        <thead>
            <tr class="one">
                <th width="5%"><input type="checkbox" value="" id="check_box" onclick="selectall('id[]');"></th>
              	<th width=80>标签名称</th>
                <th width=40>商品数</th>  
                <th width=200>SEO Title</th>  
                <th width=80>分类</th>
                <th width=80>排序值</th>  
                <th width=60>首页显示</th>             
              	<th width=60>操作</th>
            </tr>
        </thead>
    	<tbody>
        <volist name="tags_list" id='val'>
        <tr>
            <td align="center"><input type="checkbox" value="{$val.id}" name="id[]"></td>
            <td align="center"><a href="{:U('ItemsTags/edit',array('id'=>$val['id']))}"><em style="color:black;">{$val.name}</em></a></td>
            <td align="center"><em style="color:red;">{$val.item_nums}</em></td>
            <td align="center">{$val.seo_title}</td>
            <td align="center">{$cates_list[$val['pid']]['name']}<if condition="$val['sid'] neq 0">---{$cates_list[$val['sid']]['name']}</if></td>
            <td align="center"><input type="text" class="input-text-c input-text" value="{$val.ord}" size="4" name="orders[{$val.id}]" /></td>
            <td align="center" onclick="status({$val.id},'is_index')" id="is_index_{$val.id}"><img src="__PUBLIC__/statics/images/status_{$val.is_index}.gif" /></td>
            <td align="center"><a class="blue" href="{:U('ItemsTags/edit',array('id'=>$val['id']))}">编辑</a></td>
        </tr>
        	
        </volist>
    	</tbody>
    </table>
    
    <div class="btn">
    <label for="check_box" style="float:left;">全选/取消</label>
    <input type="submit" class="button" name="delete" value="删除" style="float:left;margin:0 10px 0 10px;" onclick="return check();" />
    <input type="submit" class="button" name="order" onclick="document.myform.action='{:U('ItemsTags/order')}'" value="排序"/>
    <div id="pages">{$page}</div>
    </div>
    </div>
    </form>
</div>
</body>
</html>